import Vue from 'vue'
import Cookies from 'js-cookie'
import App from './App.vue'
import router from './router'
import store from './store'
import * as filters from './filters'
import '@/styles/index.scss' // global css
import ElementUI from 'element-ui'

// import '../public/static/UE/ueditor.config.js'
// import '../public/static/UE/ueditor.all.min.js'
// import '../public/static/UE/lang/zh-cn/zh-cn.js'
// import '../public/static/UE/ueditor.parse.js'
// import '../public/static/UE/dialogs/xiumi-ue-dialog-v5.js'
// import '../public/static/UE/dialogs/xiumi-ue-v5.css'
// import '../public/static/UE/dialogs/135editor.js'
// import '../public/static/UE/dialogs/135-ue-v5.css'
// import '../public/static/UE/themes/default/css/ueditor.css'

import './icons'
import './permission' // 权限认证
import _ from 'lodash'
import moment from 'moment'
import 'default-passive-events'

// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

// const domain = 'https://admin.zleniao.com'
// const domain = 'http://hailiang.58vip.cn/'
const domain = 'https://education.vastdata.com.cn'
// const domain = 'https://hailiang.58vip.cn'
// const domain = 'http://127.0.0.1:4003'

Vue.prototype.CMBASE = {
    baseUploadSize : 10000 ,
    baseUploadAction : domain + '/CM-API/system/common/upload',
    baseUploadFileAction : domain + '/CM-API/system/common/uploadFile',
    baseUploadExcelAction : domain + '/CM-API/api/export/importQuestions',
    baseUploadUserExcelAction : domain + '/CM-API/TbUser/importUserExcel',
    baseFileContext : domain,
}


import api from '@/api/index'
Vue.use(api)

Vue.prototype.moment = moment
Vue.prototype._ = _
Vue.config.productionTip = false
Vue.prototype.isPro = process.env.NODE_ENV === 'production'

Vue.use(ElementUI, {
  // size: Cookies.get('size') || 'medium' // set element-ui default size
  size: Cookies.get('size') || 'mini' // set element-ui default size
})


import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')

Vue.use(VideoPlayer)


// 集成G2
import * as G2 from '@antv/g2'
Vue.use(G2)


// 集成百度地图
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
    ak: 'gfp0x1cGWcy0hZ2Bkbp93I23eznXbnYz'
})

// 集成高德地图
import AMap from 'vue-amap';
Vue.use(AMap);
 // 初始化vue-amap
AMap.initAMapApiLoader({
    // 高德key
    key: '0cd4c9a6f3cd94faf13853a40f599013',
    // 插件集合 （插件按需引入）
    plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'],
    v: '1.4.4',
    uiVersion: '1.0'
});



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
